package com.cskaoyan.bean.baseresultVO;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.w3c.dom.stylesheets.LinkStyle;

import java.util.List;

/**
 * @author stone
 * @date 2021/11/29 15:37
 * <p>
 * 分页与数据
 */

@Data
@AllArgsConstructor
@NoArgsConstructor
public class BaseData {
    Integer page;
    Integer limit;
    Integer total;
    Integer pages;
    List list;


    public static BaseData list(List list,long total) {
        BaseData data1 = new BaseData();
        data1.setList(list);
        data1.setTotal((int) total);
        return data1;
    }

    public static BaseData getBack(Integer limit, Integer page
            , Integer pages, Integer total, List data) {
        BaseData baseData = new BaseData(page, limit, total, pages, data);
        return baseData;
    }

}
